#include "ObjectInteraction.h"
#include "Global.h"

namespace RisingStar
{

	CObjectInteraction::CObjectInteraction(TObjectProperty objPropert):CObject(objPropert)
	{		
		Init();
	}
	
	CObjectInteraction::CObjectInteraction()
	{
		Init();
	}
	
	CObjectInteraction::~CObjectInteraction()
	{

		
	}
	
	CObject::ObjectPtr CObjectInteraction::Copy()
	{
		//cout<<"CObjectInteraction Copy"<<endl;
		
		ObjectPtr pUser(new CObjectInteraction(mObjectProperty));
		*pUser = (*this);

		return pUser;
	}
	
	bool CObjectInteraction::Init()
	{
		nValues["对象类型"] = "互动";
		nValues["数据库类型"] = "手机";
		sGlobal.RequestCallbackMap["增加互动"] = CObjectInteraction::ObjectCallbackUserRegister;

		return true;
	}
	
	bool CObjectInteraction::ObjectCallbackUserRegister(CObject* obj)
	{
		cout<<"互动注册函数调用成功"<<endl;
		return true;
	}
	bool CObjectInteraction::ObjectCallbackUserEdit(CObject* obj)
	{
		//cout<<"互动修改函数调用成功"<<endl;
		ObjectCallbackSqlEdit(obj);
		return true;
	}
	
	bool CObjectInteraction::ObjectCallbackUserDel(CObject* obj)
	{
		ObjectCallbackSqlDel(obj);

		return true;
	}
	
	
	
	bool CObjectInteraction::ObjectCallbackUserPasswordResetAndLogin(CObject* obj)
	{
		
		ObjectCallbackSqlAddOrEdit(obj);
		
		
		
		cout<<"密码重置并登录"<<endl;
		return true;
	}
	
	bool CObjectInteraction::ObjectCallbackUserPasswordLogin(CObject* obj)
	{
		
		
		cout<<"密码登录"<<endl;
		return true;
	}
	
	bool CObjectInteraction::ObjectCallbackUserIdentifyingCodeSend(CObject* obj)
	{
		cout<<"互动验证码发送"<<endl;
		return true;
	}
	
	
	
}

